<?php
$arr = [];
foreach($result as $v) $arr[date('Y-m-d',$v['recommend_time'])][] = $v;
?>
<input type="hidden" name="is_deduction_integral" value="<?php echo $is_deduction_integral?>" class="<?php echo $is_deduction_integral == 'is_deduction_integral' ? 'hide1':''?>">
    	<div id="content6"  class="<?php echo $is_deduction_integral == 'is_not_deduction_integral' ? '':'hide1'?>">
			<img class="icon_delete6" onclick="closePopup()" src="__PUBLIC__/home/images/icon_delete1.png"/>
			<div class="content2_box">
				  <div class="content6_box">				 
					 <h4>今日推荐</h4>
					 <ul class="con6_ul">
						 <?php $todayArr = empty($arr[date('Y-m-d',time())]) ? [] : $arr[date('Y-m-d',time())];?>
						 <?php foreach($todayArr as $k => $v){?>
							<li>
								<p class="p_name">股票名称:
								<span> <?php echo $k == 0 ? $v['shares_name'] : ($v['is_reading'] == 1  ? $v['shares_name'] : mb_substr($v['shares_name'],0,1,'utf-8').'***********')?> </span>
								<span class="sp_time">推荐时间: <i class="time"><?php echo date('Y-m-d',$v['recommend_time'])?></i></span><span class="lookSpan" onclick="lookRecommend(this)" data-id="<?php echo $v['shares_id']?>">
									<?php echo $k ==0  || $v['is_reading'] == 1 ?  ''  : '查看'?>
								</span>
								</p>
								<div class="info">
									<em><?php echo $k == 0 ? $v['introduce'] :($v['is_reading'] == 1  ? $v['introduce'] : mb_substr($v['introduce'],0,10,'utf-8').'***********');?></em>
								</div>
							</li>

						 <?php }  ?>
	                </ul>
	                <div class="list">
	                	<p class="h">历史推荐</p>
	                	<ul class="list_ul">
	                		<li class="li_left">名称代码</li>
	                		<li>推荐时间</li>
	                		<li class="li_right">推荐理由</li>
	                	</ul>
	                	<div class="tab ">
	                		<table  class="tabl">
								<?php foreach($arr as $k=>$v1){
									$time = date('Y-m-d',time());
									if($k == $time){continue;}
								?>
								<?php foreach($v1 as $v2){?>
	                				<tr><td class="td_1"><?php echo $v2['shares_name']?></td><td><?php echo date('Y-m-d',$v2['recommend_time'])?></td><td class="look">
										<span onclick="lookOne(this)" data-id="<?php echo $v2['shares_id']?>">查看</span></td></tr>
								<?php } ?>
								<?php } ?>
	                						
	                		</table>          
	                	</div>
	                	
	                </div>
	                <p class="Prompt">投资有风险，入市需谨慎</p>
				 </div>
            </div>
		</div>
		<div id="content6_small" class="hide1">
			<img class="icon_delete7" onclick="closeSmall()" src="__PUBLIC__/home/images/icon_delete1.png"/>
			<img class="icon_bq" src="__PUBLIC__/home/images/icon_bq.png"/>
			<span class="Recommend">推荐理由</span>
			<div class="small_box1">
			  <p></p>
		   </div>
		</div>
		<div id="content6_integral"  class="<?php echo $is_deduction_integral == 'is_not_deduction_integral' ? 'hide1':''?>">
				<img class="icon_delete8 close" onclick="closePopup()" src="__PUBLIC__/home/images/icon_delete1.png"/>
			<div class="integral_box">
				<img class="icon_jf" src="__PUBLIC__/home/images/icon_jf.png"/>
				<p class="jf_re">本次查看需要扣除<span><?php echo $integral?></span>积分</p>
				<input class="jf_btn" type="button" onclick="everySure()" value="确认" />
			</div>
		</div>
		<div id="content6_integral1"  class="hide1">
			<img class="icon_delete8 close" onclick="closeIntegral1()" src="__PUBLIC__/home/images/icon_delete1.png"/>
			<div class="integral_box">
				<img class="icon_jf" src="__PUBLIC__/home/images/icon_jf.png"/>
				<p class="jf_re">本次查看需要扣除<span><?php echo $deduct_integral?></span>积分</p>
				<input class="jf_btn" type="button" onclick="lookRecommendSure(this)" value="确认" />
			</div>
		</div>
